<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="baseUri" value="${pageContext.request.contextPath }"
       scope="request"/>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>图书管理系统</title>
		<link rel="stylesheet" href="${baseUri}/static/layui/css/layui.css">
	</head>
	<body class="layui-layout-body">
		<div class="layui-layout layui-layout-admin">

			<!-- 引入头部导航 -->
			<c:import url="../nav/titlenav.jsp"/>

			<!-- 引入左边导航 -->
			<c:import url="../nav/leftnav.jsp"/>


			<%--中间--%>
			<div class="layui-body">
				<h1>展示学生信息</h1>
				<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
					<legend>
						<form class="layui-form" method="post"
						      action="borrowBook?sid=${student.sid}&s_id=${student.college}">
							<table border="1" style="text-align: center">
								<tr>
									<th colspan="8">添加学生借书信息</th>
								</tr>
								<c:if test="${msg!=null}">
									<tr>
										<th colspan="8" style="color:red;">错误信息:${msg}</th>
									</tr>
								</c:if>
								<tr>
									<th>编号</th>
									<th>学号</th>
									<th>名字</th>
									<th>性别</th>
									<th>年龄</th>
									<th>年级</th>
									<th>学院</th>
									<th>借书编号</th>
								</tr>

								<tr>
									<td>${student.sid}</td>
									<td>${student.identity}</td>
									<td>${student.name}</td>
									<td>${student.sex}</td>
									<td>${student.age}</td>
									<td>${student.grade}级</td>
									<td>${student.college}</td>
									<td><input type="text" name="bookId" placeholder="${student.book_id}" width="100px"
									           style="text-align: center;color: red"></td>
								</tr>
								<tr>
									<td colspan="5"></td>
									<td><input type="submit" value="确定"><input type="reset" value="重置"></td>
									<td colspan="2"></td>
								</tr>
							</table>
						</form>

					</legend>
				</fieldset>
			</div>


			<!-- 引入底部导航 -->
			<c:import url="../nav/bottom.jsp"/>
		</div>


		<script src="${baseUri}/static/layui/layui.js"></script>
		<script>
            //JavaScript代码区域
            layui.use('element', "$", function () {
                var element = layui.element;
                var $ = layui.$;

            });
            layui.use('carousel', function () {
                var carousel = layui.carousel;
                //建造实例
                carousel.render({
                    elem: '#test1',
                    width: '100%' //设置容器宽度
                    ,
                    arrow: 'always' //始终显示箭头
                    //,anim: 'updown' //切换动画方式
                });
            });
		</script>
	</body>
</html>